package com.lyn.tencent_health_code.database;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author almost
 */
@Entity
@Table(name = "tencent_health_code_record")
public class HealthCodeRecord {
    @Id
    private String id;
    private String userId;
    private String serialNumber;
    private long time;

    //<editor-fold defaultstate="collapsed" desc="delombok">
    @SuppressWarnings("all")
    public HealthCodeRecord() {
    }

    @SuppressWarnings("all")
    public String getId() {
        return this.id;
    }

    @SuppressWarnings("all")
    public String getUserId() {
        return this.userId;
    }

    @SuppressWarnings("all")
    public String getSerialNumber() {
        return this.serialNumber;
    }

    @SuppressWarnings("all")
    public long getTime() {
        return this.time;
    }

    @SuppressWarnings("all")
    public void setId(final String id) {
        this.id = id;
    }

    @SuppressWarnings("all")
    public void setUserId(final String userId) {
        this.userId = userId;
    }

    @SuppressWarnings("all")
    public void setSerialNumber(final String serialNumber) {
        this.serialNumber = serialNumber;
    }

    @SuppressWarnings("all")
    public void setTime(final long time) {
        this.time = time;
    }

    @Override
    @SuppressWarnings("all")
    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof HealthCodeRecord)) return false;
        final HealthCodeRecord other = (HealthCodeRecord) o;
        if (!other.canEqual((Object) this)) return false;
        if (this.getTime() != other.getTime()) return false;
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
        final Object this$userId = this.getUserId();
        final Object other$userId = other.getUserId();
        if (this$userId == null ? other$userId != null : !this$userId.equals(other$userId)) return false;
        final Object this$serialNumber = this.getSerialNumber();
        final Object other$serialNumber = other.getSerialNumber();
        if (this$serialNumber == null ? other$serialNumber != null : !this$serialNumber.equals(other$serialNumber)) return false;
        return true;
    }

    @SuppressWarnings("all")
    protected boolean canEqual(final Object other) {
        return other instanceof HealthCodeRecord;
    }

    @Override
    @SuppressWarnings("all")
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final long $time = this.getTime();
        result = result * PRIME + (int) ($time >>> 32 ^ $time);
        final Object $id = this.getId();
        result = result * PRIME + ($id == null ? 43 : $id.hashCode());
        final Object $userId = this.getUserId();
        result = result * PRIME + ($userId == null ? 43 : $userId.hashCode());
        final Object $serialNumber = this.getSerialNumber();
        result = result * PRIME + ($serialNumber == null ? 43 : $serialNumber.hashCode());
        return result;
    }

    @Override
    @SuppressWarnings("all")
    public String toString() {
        return "HealthCodeRecord(id=" + this.getId() + ", userId=" + this.getUserId() + ", serialNumber=" + this.getSerialNumber() + ", time=" + this.getTime() + ")";
    }
    //</editor-fold>
}
